#include <iostream>
#include <unistd.h>
int main()
{
  char arr[101] = {'\0'};
  char op[5] = {'-', '\\', '|', '/'};
  for(int i = 0; i <= 100; i++)
  {
    arr[i] = '=';
    if(i != 100)
    {
      arr[i + 1] = '>';
      printf("[%-100s][%d%%][%c]\r", arr, i, op[i % 4]);
    }
    else 
      printf("[%-100s][%d%%][%c]\r", arr, i, op[i % 4]);
    fflush(stdout);
    usleep(80000);
  }
  printf("\n");
  return 0;
}
